<extend name="./Common/View/Public/form.html" />
<block name="page_title">添加教师</block>
<block name="main">
        <form class="layui-form" method="post" action="base/teacher/insert" lay-filter="pageForm">
            <div class="layui-form-item">
                <label class="layui-form-label">工号</label>
                <div class="layui-input-inline">
                    <input type="text" name="number" maxlength="30" minlength="1" lay-verify="required|length" placeholder="请输入工号" autocomplete="off" class="layui-input" />
                </div>
                <div class="layui-form-mid layui-word-aux">1-20个英文或数字</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-inline">
                    <input type="text" name="name" maxlength="30" minlength="1" lay-verify="required|length" placeholder="请输入姓名" autocomplete="off" class="layui-input" />
                </div>
                <div class="layui-form-mid layui-word-aux">1-20个英文或汉字</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">所在部门</label>
                <div class="layui-input-block">
                    <select name="depart_id" id="depart_id" lay-filter="depart_id" value="0" tree="base/Department/tree/status/1" empty="未分配部门">
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">岗位类型</label>
                <div class="layui-input-block">
                    {:W('Todo/Dict/radio',array('SCHOOL_POSITION','position',1))}
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">性别</label>
                <div class="layui-input-block">
                    {:W('Todo/Dict/radio',array('SEX','sex',0))}
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">邮箱</label>
                <div class="layui-input-inline">
                    <input type="email" name="email" lay-verify="email" placeholder="请输入电子邮箱" autocomplete="off" class="layui-input" />
                </div>
                <div class="layui-form-mid layui-word-aux">1-20个英文或汉字</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">手机号</label>
                <div class="layui-input-inline">
                    <input type="text" name="phone" lay-verify="phone" placeholder="请输入手机号" autocomplete="off" class="layui-input" />
                </div>
                <div class="layui-form-mid layui-word-aux">有效的手机号码</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">联系地址</label>
                <div class="layui-input-block">
                    <input type="text" name="address" maxlength="50" lay-verify="length" placeholder="请输入联系地址" autocomplete="off" class="layui-input" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">生日</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" laydate name="birthday" id="birthday" placeholder="{:date('Y-m-d')}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-block">
                    {:W('Todo/Dict/radio',array('STATUS','status',1))}
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="pageForm">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </block>

<block name="script">
    <script>
        layui.use('laydate', function() {
            var laydate = layui.laydate;

            //常规用法
            laydate.render({
                elem: '#birthday'
            });
        });
    </script>
</block>